package com.buddy.demo.spring.schedule;

import org.springframework.stereotype.Component;

@Component
public class SpringScheduleCron {

//

//    @Scheduled(cron = "* * * * * *")
//    public void cronTest() throws InterruptedException {
//        System.out.println(Thread.currentThread().getName());
//        System.out.println("Thread2=>"+ LocalDateTime.now());
//        // 只有一个线程，并且是在当前 thread 后执行
//        Thread.sleep(2000);
//    }

}
